package com.tutorialspoint;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.ModelMap;

import com.map.domain.Coords;

import java.util.*;

import javax.servlet.http.HttpServletResponse;

@Controller
public class HelloController{
	
	@RequestMapping(value = "/hello", method = RequestMethod.GET)
       public String hello(ModelMap model) {
		model.addAttribute("message", "Hello Spring MVC Framework!");
	      return "hello";
       }
	
	@RequestMapping(value = "/findCoords", method = RequestMethod.GET)
    public @ResponseBody List<Coords> findCoords(HttpServletResponse response,ModelMap model) {
    	List<Coords> coordsList = new LinkedList<Coords>();
           coordsList.add(new Coords(12,10));
           return coordsList;
    }
}